var app = getApp();
Page({
  data: {},
  onLoad: function () {

  },
  onGotUserInfo: function (e) {
    console.log(e.detail.errMsg)
    console.log(e.detail.userInfo)
    console.log(e.detail.rawData)


    console.log(e);

  },
  login: function (e) {
    console.log("我点击了登录");
    this.setData({
      loading: !this.data.loading
    });
    app.globalData.userInfo = e.detail.userInfo;
    console.log(e);
    wx.showToast({
      title: '登录成功',
      icon: 'success'
    });
    this.setData({
      loading: !this.data.loading
    });
    wx.reLaunch({
      url: '../../pages/mine/index',
    })
  },
  signin: function () {
    wx.navigateTo({
      url: '../../pages/login/signin',
    })
  }
})